package com.atguigu.gulimall.search.feign;

import com.atguigu.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * @Description : 远程调用商品服务
 * @Author : mayp
 * @Date: 2020-10-15 21:15
 */
@FeignClient("gulimall-product")
public interface ProductFeignService {

    /**
     * 属性的详细信息
     * @param attrId
     * @return
     */
    @GetMapping("/product/attr/info/{attrId}")
    R getAttrsInfo(@PathVariable("attrId") Long attrId);

    @GetMapping("/product/brand/infos")
    R info(@RequestParam("brandIds") List<Long> brandIds);

    @GetMapping("/product/spuinfo/list")
    R list(@RequestParam Map<String, Object> params);

}
